<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;


Route::group(['prefix'=>'admin/','name'=>'admin'], function(){

    //登录
    Route::get('login', 'login/index')->name('admin/login/index');
    Route::post('login', 'login/handlerLogin')->name('admin/login/index');

//    //文件上传界面显示
//    Route::get('up','@admin/up/index')->name('admin/up/index');
//    //文件上传接受
//    Route::post('upload','@admin/up/upload')->name('admin/up/upload');
//    //删除文件
//    Route::delete('del','admin/up/del')->name('admin/up/del');

    //后台首页
    Route::group(['middleware'=>['CheckLogin']],function(){
        Route::get('index','index/index')->name('admin/index/index');
        Route::get('welcome','index/welcome')->name('admin/index/welcome');
    });
    //文章管理
    Route::resource('art','article')->name('article');
});